import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:top_foundation/top_foundation.dart';
import 'package:top_foundation/utils/util.dart';

import 'index.dart';
import 'widgets/widgets.dart';

class DashPage extends GetView<DashController> {
  const DashPage({Key? key}) : super(key: key);

  // 主视图
  Widget _buildView() {
    return ListView(
      children: [
        Container(
          height: 40,
          decoration: BoxDecoration(border: Border.all()),
        ),
        DashBorder(
          margin: EdgeInsets.all(10.r),
          child: Container(
            height: 36.r,
            alignment: Alignment.center,
            child: Text(
              'dash border',
              style: TextStyle(
                color: Colors.blue,
                fontSize: 15.sp,
              ),
            ),
          ),
        ),
        SizedBox(height: 60),
        DashLine(),
      ],
    );
  }

  @override
  Widget build(BuildContext context) {
    return GetBuilder<DashController>(
      builder: (_) {
        return Scaffold(
          appBar: AppBar(title: const Text("dash")),
          body: SafeArea(
            child: _buildView(),
          ),
        );
      },
    );
  }
}
